package binarysearchtree;

/**
 * @Author liangzai
 * @Description:
 */
public class Test {
    public static void main(String[] args) {
        BinarySearchTree tree = new BinarySearchTree();
        TreeNode root = tree.root;
        tree.insert(10);
        tree.insert(5);
        tree.insert(15);
        tree.insert(9);
        tree.insert(3);
        tree.insert(18);
        TreeNode ret = tree.search(15);
        System.out.println(ret.val);

        tree.remove(10);
    }
}
